#ifndef LINKEDList_H
#define LINKEDList_H

#include <iostream>
#include <string>

using namespace std;

struct Node
{
    int data;
    Node *next;
    bool visited = false;
};

class LinkedList
{
public:
    Node *head;
    Node *tail;

public:
    LinkedList()
    {
        head = NULL;
        tail = NULL;
    }
    void insert(int a)
    {
        Node *temp = new Node;
        temp->data = a;
        temp->next = NULL;
        if (head == NULL)
        {
            head = temp;
            tail = temp;
            tail->next = head;
        }
        else
        {
            tail->next = temp;
            tail = temp;
            tail->next = head;
        }
    }
};

#endif;